﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Components.Data;
using Components.SQL;
using System.Web.Security;

namespace Erendora.Admin
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            ErendoraMembershipUser u = (ErendoraMembershipUser)Membership.GetUser();

            Response.Write(u.GetCharacterCount().ToString() + "<br />");

            for (int i = 0; i < u.GetCharacterCount(); ++i)
            {
                Character c = u.GetCharacter(i);
                if (c != null)
                {
                    Response.Write(c.Name + "<br />" + c.CharacterId + "<br />" + c.Level + "<br />" + c.STA + "<br />" + c.STR + "<br />...<br />Inventar:<br/>Normal<br/>");
                    Inventory inv = c.Inventory;
                    for (int j = 0; j < 42; ++j)
                    {
                        Item itm = inv.GetContent(j);
                        if (itm != null)
                        {
                            Response.Write(j + ". " + itm.ItemId.ToString() + "  " + itm.Count.ToString() + "<br/>");
                        }
                    }
                    Response.Write("Equip<br/>");
                    for (int j = 0; j < 31; ++j)
                    {
                        Item itm = inv.GetEquip(j);
                        if (itm != null)
                        {
                            Response.Write(j + ". " + itm.ItemId.ToString() + "  " + itm.Count.ToString() + "<br/>");
                        }
                    }

                }
            }
            Response.End();
        }
    }
}